
import { baseUrl } from '../src/env'


export default class http {

    get(url, data, isNeedBaseUrl) {
        var options = {
            url: !isNeedBaseUrl ? this.baseApi + url : url,
            data: data || {},
            method: 'get',
        };
        this.request(options);
    }
    post(method, data, query) {
        var options = {
            url: query ? this.baseApi + query : this.baseApi,
            data: {method: method, params: data},
            method: 'post',
        };
        return this.request(options);
    }
    all(array) {
      var promiseAll = Promise.all(array)
      return promiseAll
    }
    
   
}



